package com.liwbn.rbac.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.liwbn.rbac.model.Framemenu;
import com.liwbn.rbac.model.Permission;
import com.liwbn.rbac.model.PermissionExample;
import com.liwbn.rbac.vo.SideBar;

public interface PermissionMapper {
    int countByExample(PermissionExample example);

    int deleteByExample(PermissionExample example);

    int deleteByPrimaryKey(Long id);

    long insert(Permission record);

    int insertSelective(Permission record);

    int insertBatch(List<Permission> records);

    List<Permission> selectByExample(PermissionExample example);

    List<Framemenu> selectAsMenuByExample(PermissionExample example);

    Permission selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") Permission record,
            @Param("example") PermissionExample example);

    int updateByExample(@Param("record") Permission record,
            @Param("example") PermissionExample example);

    int updateByPrimaryKeySelective(Permission record);

    int updateByPrimaryKey(Permission record);

    List<SideBar> selectAllPermissionByExample(PermissionExample example);

    List<Long> selectMenuIdByRoles(List<Long> ids);
}
